# server.py
import uvicorn
from dotenv import load_dotenv
from app.core.config import settings

if __name__ == "__main__":
    if load_dotenv():
        print("Loaded environment variables from .env file")
    if settings.PORT is None:
        print("PORT environment variable not set. Using default port 8000")
        settings.PORT = "8000"
    uvicorn.run("app.app:app", host="0.0.0.0", port=int(settings.PORT), reload=True)
